package com.maychat.pojo;

import com.maychat.config.AppConfig;
import com.maychat.config.Consts;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserInfoToken implements Serializable {
    @Serial
    private static final long serialVersionUID = -6597505585794974711L;

    private String token;
    private String userId;
    private String nickName;
    private boolean admin;

    public static UserInfoToken getRobotToken(MayChatSystemOptions options) {
        if (options == null) options = new MayChatSystemOptions();
        return new UserInfoToken(null, options.getRobotUId(), options.getRobotNickName(), false);
    }


}
